package com.plian.system.entity.fr.bulletin;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.plian.Tools.DateUtil;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

/**
 * @description: 快报主表
 * @author: gangan
 * @create: 2021-02-02 16:45
 */
@Data
@TableName("fr_bulletin")
@Builder
@AllArgsConstructor
@NoArgsConstructor
@ApiModel(value = "快报主表", description = "快报主表")
public class NewBulletin implements Serializable {
    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    @ApiModelProperty(value = "主键")
    private String id;

    /**
     * 单位id
     */
    @ApiModelProperty(value = "单位id")
    private String orgId;

    /**
     * 状态
     */
    @ApiModelProperty(value = "状态")
    private String status;

    /**
     * 单据类型
     */
    @ApiModelProperty(value = "单据类型")
    private String formType;

    /**
     * 报表类型码 0单户 1差额 6合并
     */
    @ApiModelProperty(value = "报表类型码 0单户 1差额 6合并")
    private String tableTypeCode;

    /**
     * 报表合并层级码
     */
    @ApiModelProperty(value = "报表合并层级码")
    private String summaryCode;

    /**
     * 填报时间
     */
    @ApiModelProperty(value = "填报时间")
    @DateTimeFormat(pattern = DateUtil.PATTERN_MONTH)
    @JsonFormat(pattern = DateUtil.PATTERN_MONTH, timezone = "Asia/Shanghai")
    private Date reportTime;

    /**
     * 填报人
     */
    @ApiModelProperty(value = "填报人")
    private String applicant;

    /**
     * 联系电话
     */
    @ApiModelProperty(value = "联系电话")
    private String phone;

    /**
     * 填报值
     */
    @ApiModelProperty(value = "填报值")
    @TableField(exist = false)
    private List<BulletinValue> bulletinValues;

    @TableField(exist = false)
    @ApiModelProperty(value = "子表id")
    private List<String> childIds;

    /**
     * 数据来源 null为系统填报 对应用户id
     */
    @ApiModelProperty(value = "数据来源 null为系统填报 对应用户id")
    private String dataSource;

    /**
     * 数据来源id
     */
    @ApiModelProperty(value = "数据来源id")
    private String dataSourceId;
}
